/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Test;

import RPS.PeerSchema;
import Rewriting.FederationManager;
import Rewriting.Source;
import SPARQL.SimpleURI;

/**
 *
 * @author mirko
 */
public class FedManagerFactory {

    

    FederationManager create() {
        
        FederationManager fedmanager = new FederationManager();
        
        Source source1 = new Source();
        Source source2 = new Source();
        Source source3 = new Source();
        
        // Definition SOURCE 1 
        source1.setEndpoint(new SimpleURI("http://dbpedia.org/sparql"));
        PeerSchema schema1 = new PeerSchema();
        schema1.addConstant(new SimpleURI("http://uk.dbpedia.org/resource/Mulholland_Drive"));
        schema1.addConstant(new SimpleURI("http://www.w3.org/1999/02/22-rdf-syntax-ns/type"));
        source1.setSchema(schema1);
        
        // Definition SOURCE 2 
        source2.setEndpoint(new SimpleURI("http://data.linkedmdb.org/sparql"));
        PeerSchema schema2 = new PeerSchema();
        schema2.addConstant(new SimpleURI("http://data.linkedmdb.org/resource/film/21"));
        schema2.addConstant(new SimpleURI("http://www.w3.org/1999/02/22-rdf-syntax-ns/type"));
        source2.setSchema(schema2);
        
        // Definition SOURCE 3 
        
        //Adding the sources to the manager
        fedmanager.addSource(source1);
        fedmanager.addSource(source2);
        return fedmanager;
    }
    
}
